package com.tyc.log.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * 类描述
 *
 * @author tyc
 * @version 1.0
 * @date 2023-01-18 11:47:21
 */
@Aspect
public class LogRecordAspect {

    @Pointcut("@annotation(com.tyc.log.annotation.LogRecordAnnotation)")
    public void logRecord(){
    }

    @Around("logRecord()")
    public Object around(ProceedingJoinPoint joinPoint){
        Object result = null;
        try {
            result = joinPoint.proceed();
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return result;
    }
}
